home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Auge 4000 / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf / arp-pro1.3 / OLD_MANUAL / PatternMatch < prev    next >
Text File  |  1990-06-22  |  2KB  |  66 lines

  1.  
  2.  
  3.  
  4.      PatternMatch(33.4)      ARP Programmers Manual    PatternMatch(33.4)
  5.  
  6.  
  7.  
  8.      NAME
  9.       PatternMatch - perform a wildcard match on a string
  10.  
  11.      SYNOPSIS
  12.       result = PatterMatch(pat,str)
  13.          D0            A0 A1
  14.  
  15.      FUNCTION
  16.       This function    compares a string to the given pattern and
  17.       determines if    it is a    valid match.  If so it returns a true
  18.       result.  If you are calling FindFirst()/FindNext() this
  19.       function, and    the related PreParse() function    are called for
  20.       you.    You will need this function to do pattern matching on
  21.       arbitrary text, for example, in a Search command in a    text
  22.       editor, or in    implementing a 'grep' program.    The pattern
  23.       must be constructed with special preparsed tokens and
  24.       supports the following patterns:
  25.  
  26.           (p1|p2|p3)  One of the patterns p1, p2 or p3
  27.  
  28.           ?          Any single character
  29.  
  30.           #<pat>      Pattern repeated 0 or more times
  31.  
  32.           [class]     Character    class0
  33.  
  34.           ~          NOT match on following pattern.
  35.  
  36.           *          0    or more    occurances of any character
  37.  
  38.      INPUTS
  39.       char *pat - The pattern string to match against, this    is
  40.           only partially ascii,    the wildcard strings must be
  41.           converted to the appropriate token value as given in
  42.           the arpbase.[ih] files. The easiest way to do    this
  43.           is to    pass the string    to PatternMatch() (V33 of
  44.           arp.library).
  45.  
  46.       char *str - The string to be matched
  47.  
  48.      RESULT
  49.       result - a boolean value indicating success/failure.
  50.  
  51.      BUGS
  52.       Character classes still do not work.
  53.  
  54.      SEE ALSO
  55.       PreParse(), FindFirst(), FindNext(), FreeAnchorChain()
  56.  
  57.      AUTHOR
  58.       Original design by JAT.  Rewritten for V39 by CDH.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/22/88)
  64.  
  65.  
  66.